﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;

namespace BBI.Model
{
    public partial class Article
    {
        [Key]
        public int ArticleId { get; set; }
        public string Title { get; set; }
        public string Abstract { get; set; }
        public string KeyWords { get; set; }
        public int ViewCount { get; set; }
       // public int Importance { get; set; }
        public int CommentCount { get; set; }
        public string ImageUrl { get; set; }
        public bool Recommend { get; set; }
        public bool Active { get; set; }
        public int CategoryId { get; set; }
        public System.DateTime AddedDate { get; set; }
        public string AddedBy { get; set; }
        public System.DateTime UpdatedDate { get; set; }
        public string UpdatedBy { get; set; }
        public string Body { get; set; }

        public virtual Category Category { get; set; }

        public string CategoryTitle
        {
            get
            {
                if (this.Category != null)
                {
                    return this.Category.Title;
                }
                return string.Empty;
            }
        }
    }
}
